home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
028a
/
unzipem.zip
/
UNZ.BLD
< prev
next >
Wrap
Text File
|
1992-01-03
|
4KB
|
148 lines
'cur.bld version of unz.bld, to control the mouse cursor
'UNZ.BLD , an unzipper to use at pcshell command line.
File Ziplist
String ZipName
Integer FirstCycle, Recycle
FirstCycle := 0
don't use the cursor
cls
if not exist "*.ZIP" ThereAreNone
FirstScreen
run dir *.ZIP | Sort > ZIPS.TMP
:FLASHBACK
Recycle := 0
DrawtheBoxes
open "ZIPS.TMP" for reading as Ziplist
while not eof Ziplist
ReadLine ZipName from Ziplist
if (ZipName contains " ZIP")
Put UpperCase ZipName into ZipName
Put Trim ZipName into ZipName
ZipName := MidStr ZipName,1,8
ShowTheName
end
end
CloseAllFiles
WannaGoAgain
if Recycle == 5 goto FLASHBACK
GetOut
'program ends on line above
sub DrawtheBoxes
if FirstCycle == 1 goto JUMPOVER
cls
HelpText
Text bright white on blue
double box 4, 20, 40, 10 bright white on blue
'co-ordinates for OK box
single box 10, 22, 6, 3 bright white on blue
'for NEXT box
single box 10, 35, 8, 3 bright white on blue
'line below is for "Exit" box
single box 10,50,8,3 bright white on blue
Say @ 7, 23 "Do you want to unzip ";
:JUMPOVER
end
sub LowHelpBox
Single Box 16,10,56,10 white on white
Single Box 15,11,56,10 black on green
end
sub HelpText
LowHelpBox
Text black on green
say @ 16,13 "~"~OK~"~ unzips the highlighted file, then exits."
say @ 17,13 "~"~NEXT~"~ shows the name of the next zip file."
say @ 19,13 "Move the highlight from box to box with the spacebar"
say @ 20,13 "or with the left and right arrow keys, then"
say @ 21,13 "press Return to choose the highlighted action."
end
sub WannaGoAgain
cls
Text bright white on blue
double box 6, 20, 40, 10 bright white on blue
'co-ordinates for OK box
single box 11, 28, 6, 3 bright white on blue
'for EXIT box
single box 11, 39, 9, 3 bright white on blue
Say @ 7,22 "You have seen all the ZIP files."
say @ 8,22 "Choose OK to see the list again."
Popup
Highlight @ 12, 29, 4
item " OK "
Recycle := 5
FirstCycle := 0
Highlight @ 12, 40, 6
item " EXIT "
GetOut
end
end
sub ThereAreNone
help2box
text black on white
say @ 10,12 "Sorry, we looked and couldn't find any ZIP files."
say @ 14,12 "Press any key to exit."
pause
GetOut
end
sub GetOut
cls
CloseAllFiles
if exist "ZIPS.TMP" run del ZIPS.TMP
use cursor
exit
end
sub help2box
Don't use the cursor
cls black on cyan
Double Box 1,1,80,24 black on cyan
Single box 9,10,56,10 black on black
Single box 8,9,56,10 black on white
end
sub FirstScreen
help2box
text black on white
say @10,12 "This is UNZIPEM, a front end for PKUNZIP."
say @12,12 "Choose a file to unzip."
say @16,12 "Alfred L. Wallace Milwaukee, Wisconsin"
end
sub ShowTheName
Put Trim ZipName into ZipName
Text blue on blue
Say @ 7,44 " "
Text black on white
Say @ 7,44 ZipName;
Say ".ZIP?"
Text bright white on blue
MouseHideCursor
Popup
Highlight @ 11, 23, 4
item " OK "
cls
System "Pkunzip " + ZipName
sleep 60 ticks
GetOut
Highlight @ 11, 36, 6
item " NEXT "
Highlight @11,51,6
item " EXIT "
GetOut
end
FirstCycle := 1
end